package com.xuan.yupao.common;


public enum ErrorCode {


    PARAMS_ERROR(40000, "请求参数错误", ""),
    NULL_ERROR(40001, "请求数据为空", ""),
    NOT_LOGIN(40100, "未登录", ""),
    NOT_AUTH(40101, "无权限", ""),
    NOT_FOUND_ERROR(40400, "请求数据不存在", ""),
    TOO_MANY_REQUEST(42900, "操作过于频繁", ""),
    SYSTEM_ERROR(50000, "系统内部错误", ""),
    OPERATION_ERROR(50001, "操作失败", "");

    private final Integer code;
    private final String errorMessage;
    private final String description;

    ErrorCode(Integer errorCode, String errorMessage, String description) {
        this.code = errorCode;
        this.errorMessage = errorMessage;
        this.description = description;
    }


    public Integer getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public String getDescription() {
        return description;
    }
}
